VI

Section: User Commands (1)
Updated: 22 December 1987
Index Return to Main Contents
 

NAME

vi, view - visual display editor based on ex(1)  

SYNOPSIS

vi [ -lrRx ] [ -t tag ] [ -wnnn ] [ +command ] filename...

view...  

DESCRIPTION

vi (visual) is a display oriented text editor based on ex(1). ex and vi are, in fact, the same text editor; it is possible to get to the command mode of ex from within vi and vice-versa.

The view command runs vi with the readonly variable set. With view, you can browse through files interactively without making any changes.  

OPTIONS

-l
Set up for editing LISP programs.
-r
Recover the named files after a crash.
-R
Edit files in read only state. This has the same effect as the view command.
-x
Prompt for a key with which to encrypt the file or files being edited.
-t tag
Edit the file containing tag. There must be a tags database in the directory, built by ctags(1), that contains a reference to tag.
+command
Start the editing session by executing command.
+command
Start the editing session by executing command.
 

ENVIRONMENT

The editor recognizes the environment variable EXINIT as a command (or list of commands separated by | characters) to run when it starts up. If this variable is undefined, the editor checks for startup commands in the file ~/.exrc file, which you must own. However, if there is a .exrc owned by you in the current directory, the editor takes its startup commands from this file --- overriding both the file in your home directory and the environment variable.  

FILES

 

SEE ALSO

ctags(1), ex(1)

Editing Text Files
Getting Started  

BUGS

Software TAB characters using CTRL-T work only immediately after the autoindent.

SHIFT-left and SHIFT-right on intelligent terminals do not make use of insert and delete character operations in the terminal.

The wrapmargin option can be fooled since it looks at output columns when blanks are typed. If a long word passes through the margin and onto the next line without a break, then the line will not be broken.

Repeating a change which wraps over the margin when wrapmargin is in effect does not generally work well: sometimes it just makes a mess of the change, and sometimes even leaves you in insert mode. A way to work around the problem is to replicate the changes using y (yank) and p (put).

Insert/delete within a line can be slow if TAB characters are present on intelligent terminals, since the terminals need help in doing this correctly.

Saving text on deletes in the named buffers is somewhat inefficient.

The source command does not work when executed as `:source'; there is no way to use the `:append', `:change', and `:insert' commands, since it is not possible to give more than one line of input to a `:' escape. To use these on a `:global' you must Q to ex command mode, execute them, and then reenter the screen editor with vi or open.

When using the -r option to recover a file, you must write the recovered text before quitting or you will lose it. vi does not prevent you from exiting without writing unless you make changes.

vi does not adjust when the SunView window in which it runs is resized.  

RESTRICTIONS

The encryption facilities of vi are not available on software shipped outside the U.S.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT
FILES
SEE ALSO
BUGS
RESTRICTIONS

This document was created by man2html, using the manual pages.
Time: 04:54:19 GMT, January 31, 2023